const mongoose = require('./../db')
const Schema = mongoose.Schema

const schema = new Schema({
  addressid: { type: String, required: true },
  userid: { type: String, required: true },
  userName: { type: String, required: true },
  telNumber: { type: String, required: true },
  provinceName: { type: String, required: true },
  cityName: { type: String, required: true },
  countyName: { type: String, required: true },
  detailInfo: { type: String, required: true },
  isDefault: { type: Boolean, required: true },
  createTime: { type: Date, required: true, default: Date.now}
})

module.exports = mongoose.model('Address', schema)